<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Processor affinity</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Processor_affinity"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Processor_affinity rootpage-Processor_affinity skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Processor affinity</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1305433154">
/* start https://en.wikipedia.org/ */
.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style>
<p>In <a href="Computer_science" title="Computer science">computer science</a>, <b>processor affinity</b>, also called <b>CPU pinning</b> or <b>cache affinity</b>, enables the binding and unbinding of a <a href="Process_(computing)" title="Process (computing)">process</a> or a <a href="Thread_(computing)" title="Thread (computing)">thread</a> to a <a href="Central_processing_unit" title="Central processing unit">central processing unit</a> (CPU) or a range of CPUs, so that the process or thread will execute only on the designated CPU or CPUs rather than any CPU. This can be viewed as a modification of the native central queue <a href="Scheduling_algorithm" class="mw-redirect" title="Scheduling algorithm">scheduling algorithm</a> in a <a href="Symmetric_multiprocessing" title="Symmetric multiprocessing">symmetric multiprocessing</a> operating system. Each item in the queue has a tag indicating its kin <a href="Central_processing_unit" title="Central processing unit">processor</a>. At the time of resource allocation, each task is allocated to its kin processor in preference to others.
</p><p>Processor affinity takes advantage of the fact that remnants of a process that was run on a given processor may remain in that processor's state (for example, data in the <a href="CPU_cache" title="CPU cache">cache memory</a>) after another process was run on that processor. Scheduling a CPU-intensive process that has few interrupts to execute on the same processor may improve its performance by reducing degrading events such as <a href="Cache_miss" class="mw-redirect" title="Cache miss">cache misses</a>, but may slow down ordinary programs because they would need to wait for that CPU to become available again.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> A practical example of processor affinity is executing multiple instances of a non-threaded application, such as some graphics-rendering software.
</p><p>Scheduling-algorithm implementations vary in adherence to processor affinity. Under certain circumstances, some implementations will allow a task to change to another processor if it results in higher efficiency. For example, when two processor-intensive tasks (A and B) have affinity to one processor while another processor remains unused, many schedulers will shift task B to the second processor in order to maximize processor use. Task B will then acquire affinity with the second processor, while task A will continue to have affinity with the original processor.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Usage">Usage</h2></div>
<p>Processor affinity can effectively reduce cache problems, but it does not reduce the persistent <a href="Load_balancing_(computing)" title="Load balancing (computing)">load-balancing</a> problem.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> Also note that processor affinity becomes more complicated in systems with non-uniform architectures. For example, a system with two <a href="Multi-core_processor" title="Multi-core processor">dual-core</a> <a href="Hyper-threading" title="Hyper-threading">hyper-threaded</a> <a href="Central_processing_unit" title="Central processing unit">CPUs</a> presents a challenge to a scheduling algorithm.
</p><p>There is complete affinity between two virtual CPUs implemented on the same core via hyper-threading, partial affinity between two cores on the same physical processor (as the cores share some, but not all, cache), and no affinity between separate physical processors. As other resources are also shared, processor affinity alone cannot be used as the basis for CPU dispatching. If a process has recently run on one virtual hyper-threaded CPU in a given core, and that virtual CPU is currently busy but its partner CPU is not, cache affinity would suggest that the process should be dispatched to the idle partner CPU. However, the two virtual CPUs compete for essentially all computing, cache, and memory resources. In this situation, it would typically be more efficient to dispatch the process to a different core or CPU, if one is available. This could incur a penalty when process repopulates the cache, but overall performance could be higher as the process would not have to compete for resources within the CPU.
</p>
<div class="mw-heading mw-heading2"><h2 id="Specific_operating_systems">Specific operating systems</h2></div>
<p>On <a href="Linux" title="Linux">Linux</a>, the CPU affinity of a process can be altered with the taskset(1) program<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> and the sched_setaffinity(2) system call. The affinity of a thread can be altered with one of the library functions: pthread_setaffinity_np(3) or pthread_attr_setaffinity_np(3).
</p><p>On <a href="Silicon_Graphics" title="Silicon Graphics">SGI</a> systems, <a rel="nofollow" class="external text" href="https://web.archive.org/web/20070701091047/http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=%2Fusr%2Fshare%2Fcatman%2Fman1%2Fdplace.1.html">dplace</a> binds a process to a set of CPUs.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>On <a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a> 1.9 (2007) and later versions, usched_set system call can be used to control the affinity of a process.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> On <a href="NetBSD" title="NetBSD">NetBSD</a> 5.0, <a href="FreeBSD" title="FreeBSD">FreeBSD</a> 7.2, <a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a> 4.7 and later versions can use pthread_setaffinity_np and pthread_getaffinity_np.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> In <a href="NetBSD" title="NetBSD">NetBSD</a>, the psrset utility<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> to set a thread's affinity to a certain CPU set. In <a href="FreeBSD" title="FreeBSD">FreeBSD</a>, cpuset<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> utility is used to create CPU sets and to assign processes to these sets. In <a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a> 3.1 (2012) and later, usched utility can be used for assigning processes to a certain CPU set.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p><p>On <a href="Windows_NT" title="Windows NT">Windows NT</a> and its successors, thread and process CPU affinities can be set separately by using SetThreadAffinityMask<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> and SetProcessAffinityMask<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> API calls or via the Task Manager interface (for process affinity only).
</p><p><a href="MacOS" title="MacOS">macOS</a> exposes an affinity API<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> that provides hints to the kernel how to schedule threads according to affinity sets.
</p><p>On <a href="Solaris_(operating_system)" class="mw-redirect" title="Solaris (operating system)">Solaris</a> it is possible to control bindings of processes and LWPs to processor using the pbind(1)<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> program. To control the affinity programmatically processor_bind(2)<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> can be used. There are more generic interfaces available such as pset_bind(2)<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> or lgrp_affinity_get(3LGRP)<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> using processor set and locality groups concepts.
</p><p>On <a href="IBM_AIX" title="IBM AIX">AIX</a> it is possible to control bindings of processes using the bindprocessor command<sup id="cite_ref-processor-affinity-on-aix_18-0" class="reference"><a href="#cite_note-processor-affinity-on-aix-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> and the bindprocessor API.<sup id="cite_ref-processor-affinity-on-aix_18-1" class="reference"><a href="#cite_note-processor-affinity-on-aix-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Affinity_mask" title="Affinity mask">Affinity mask</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ibm.com/docs/en/aix/7.2?topic=architecture-processor-affinity-binding">"Processor affinity and binding"</a>. <i><a href="IBM" title="IBM">IBM</a></i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-06-08</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://www.tmurgent.com/WhitePapers/ProcessorAffinity.pdf">"White Paper - Processor Affinity"</a> - From <a rel="nofollow" class="external text" href="http://www.tmurgent.com">tmurgent.com</a>. Accessed 2007-07-06.</span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/taskset.1">taskset(1)</a></code></span> – <a href="Linux" title="Linux">Linux</a> User <a href="Man_page" title="Man page">Manual</a> – User Commands</span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=/usr/share/catman/man1/dplace.1.html">dplace.1</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20070701091047/http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=linux&db=man&fname=%2Fusr%2Fshare%2Fcatman%2Fman1%2Fdplace.1.html">Archived</a> 2007-07-01 at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a> - From <i><a rel="nofollow" class="external text" href="http://www.sgi.com">sgi.com</a></i>. Accessed 2007-07-06.</span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://mdoc.su/d/usched_set.2">"<code>usched_set(2)</code> — setting up a proc's usched"</a>. <i>DragonFly System Calls Manual</i>. <a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2019-07-28</span></span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://bxr.su/d/sys/kern/kern_usched.c#sys_usched_set">"<code>kern/kern_usched.c § sys_usched_set</code>"</a>. <i>BSD Cross Reference</i>. <a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2019-07-28</span></span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><code><span class="url"><a rel="nofollow" class="external text" href="http://mdoc.su/n,f,d/pthread_setaffinity_np.3">pthread_setaffinity_np(3)</a></span></code> – <a href="NetBSD" title="NetBSD">NetBSD</a>, <a href="FreeBSD" title="FreeBSD">FreeBSD</a> and <a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a> Library Functions Manual</span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://man.netbsd.org/psrset.8">psrset(8)</a></code></span> – <a href="NetBSD" title="NetBSD">NetBSD</a> System Manager's <a href="Man_page" title="Man page">Manual</a></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><span class="neverexpand"><code><a rel="nofollow" class="external text" href="https://www.freebsd.org/cgi/man.cgi?query=cpuset&sektion=1">cpuset(1)</a></code></span> – <a href="FreeBSD" title="FreeBSD">FreeBSD</a> General Commands <a href="Man_page" title="Man page">Manual</a></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://mdoc.su/d/usched.8">"<code>usched(8)</code> — run a program with a specified userland scheduler and cpumask"</a>. <i>DragonFly System Manager's Manual</i>. <a href="DragonFly_BSD" title="DragonFly BSD">DragonFly BSD</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2019-07-28</span></span>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://msdn2.microsoft.com/en-us/library/ms686247(VS.85).aspx">SetThreadAffinityMask</a> - <a href="MSDN_Library" class="mw-redirect" title="MSDN Library">MSDN Library</a></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://msdn2.microsoft.com/en-us/library/ms686223(VS.85).aspx">SetProcessAffinityMask</a> - <a href="MSDN_Library" class="mw-redirect" title="MSDN Library">MSDN Library</a></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://developer.apple.com/library/mac/#releasenotes/Performance/RN-AffinityAPI/index.html">"Thread Affinity API Release Notes"</a>. <i>Developer.apple.com</i>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://docs.oracle.com/cd/E23824_01/html/821-1462/pbind-1m.html">pbind(1M)</a> - Solaris man page</span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://docs.oracle.com/cd/E19109-01/tsolaris8/817-0881/6mglbsoma/index.html">processor_bind(2)</a> - Solaris man page</span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://docs.oracle.com/cd/E26502_01/html/E29032/pset-bind-2.html#REFMAN2pset-bind-2">pset_bind(2)</a> - Oracle Solaris 11.1 Information Library - man pages section 2</span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><a rel="nofollow" class="external text" href="http://docs.oracle.com/cd/E19120-01/open.solaris/820-1691/lgroups-193/index.html">lgrp_affinity_get(3LGRP)</a> - Memory and Thread Placement Optimization Developer's Guide</span>
</li>
<li id="cite_note-processor-affinity-on-aix-18"><span class="mw-cite-backlink">^ <a href="#cite_ref-processor-affinity-on-aix_18-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-processor-affinity-on-aix_18-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFUmesh_Prabhakar_GaikwadKailas_S._Zadbuke2006" class="citation web cs1">Umesh Prabhakar Gaikwad; Kailas S. Zadbuke (November 16, 2006). <a rel="nofollow" class="external text" href="https://www.ibm.com/developerworks/aix/library/au-processinfinity.html">"Processor affinity on AIX"</a>. <i><a href="IBM" title="IBM">IBM</a></i>.</cite></span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/b_commands/bindprocessor.html">"bindprocessor Command"</a>. <i>IBM</i>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/b_bostechref/bindprocessor.html">"bindprocessor Subroutine"</a>. <i>IBM</i>.</cite></span>
</li>
</ol></div></div>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}
/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}
/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Processor_scheduling67" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */
.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div id="Processor_scheduling67" style="font-size:114%;margin:0 4em"><a href="Scheduling_(computing)" title="Scheduling (computing)">Processor scheduling</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Algorithms</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Deadline-monotonic_scheduling" title="Deadline-monotonic scheduling">Deadline-monotonic</a></li>
<li><a href="Earliest_deadline_first_scheduling" title="Earliest deadline first scheduling">Earliest deadline</a></li>
<li><a href="Earliest_eligible_virtual_deadline_first_scheduling" title="Earliest eligible virtual deadline first scheduling">Earliest eligible virtual deadline first</a></li>
<li><a href="Fair-share_scheduling" title="Fair-share scheduling">Fair-share</a></li>
<li><a href="Fixed-priority_pre-emptive_scheduling" title="Fixed-priority pre-emptive scheduling">Fixed-priority pre-emptive</a></li>
<li><a href="Foreground-background" title="Foreground-background">Foreground-background</a></li>
<li><a href="Gang_scheduling" title="Gang scheduling">Gang</a></li>
<li><a href="Generalized_foreground-background" title="Generalized foreground-background">Generalized foreground-background</a></li>
<li><a href="Highest_response_ratio_next" title="Highest response ratio next">Highest response ratio next</a></li>
<li><a href="Lottery_scheduling" title="Lottery scheduling">Lottery</a></li>
<li><a href="Multilevel_feedback_queue" title="Multilevel feedback queue">Multilevel feedback queue</a></li>
<li><a href="Process_Contention_Scope" class="mw-redirect" title="Process Contention Scope">Process Contention Scope</a></li>
<li><a href="Proportional_share_scheduling" title="Proportional share scheduling">Proportional share</a></li>
<li><a href="Rate-monotonic_scheduling" title="Rate-monotonic scheduling">Rate-monotonic</a></li>
<li><a href="Round-robin_scheduling" title="Round-robin scheduling">Round-robin</a></li>
<li><a href="Shortest_job_next" title="Shortest job next">Shortest job next</a></li>
<li><a href="Shortest_remaining_time" title="Shortest remaining time">Shortest remaining time</a></li>
<li><a href="Statistical_time-division_multiplexing" title="Statistical time-division multiplexing">Statistical time-division multiplexing</a></li>
<li><a href="Stride_scheduling" title="Stride scheduling">Stride</a></li>
<li><a href="Two-level_scheduling" title="Two-level scheduling">Two-level</a></li>
<li><a href="Windows_NT_processor_scheduling" title="Windows NT processor scheduling">Windows NT</a></li>
<li><a href="YDS_algorithm" title="YDS algorithm">YDS algorithm</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Linux</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Brain_Fuck_Scheduler" title="Brain Fuck Scheduler">Brain Fuck</a></li>
<li><a href="Completely_Fair_Scheduler" title="Completely Fair Scheduler">Completely Fair</a></li>
<li><a href="O(1)_scheduler" title="O(1) scheduler">O(1)</a></li>
<li><a href="O(n)_scheduler" title="O(n) scheduler">O(n)</a></li>
<li><a href="SCHED_DEADLINE" title="SCHED DEADLINE">SCHED DEADLINE</a></li>
<li><a href="SCHED_FIFO" class="mw-redirect" title="SCHED FIFO">SCHED FIFO</a></li>
<li><a href="SCHED_NORMAL" class="mw-redirect" title="SCHED NORMAL">SCHED NORMAL</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul>
<li><a href="Starvation_(computer_science)" title="Starvation (computer science)">Starvation</a></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-04-27" href="https://en.wikipedia.org/wiki/?title=Processor_affinity&oldid=1287692261">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>